<html>
<head>
    <meta content="text/html; charset=utf-8" http-equiv="content-type">
    <title>
        js调用java
    </title>

</head>

<body>
分享页面

<input type="button" value="上传图片" onclick="getPayDeviceInfo()">
<script src="http://cdn.bootcss.com/jquery/2.2.1/jquery.js"></script>
<script type="text/javascript">



function getPayDeviceInfo() {
              //call native method
            window.WebViewJavascriptBridge.callHandler(
                'getPayDeviceInfo'
                , ''
                , function(responseData) {
                alert(responseData);
                var deviceInfo = responseData.split(',')
                //getAndroidNum(deviceInfo[0],deviceInfo[1]);
                alert(deviceInfo[1]);
                }
            );
        }

$(function () {
        getPayDeviceInfo();
}




</script>
</body>


<img   id="photo1" />

</html>